<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/view/include/taglib.jsp"%>
<div id="bansdiv">
	<c:forEach	items="${loudong}" var="item" varStatus="status">
		<c:choose>
		  <c:when test="${status.index==0}">
			<div class="bandiv button button-big button-rounded roomgold" onclick="selectBan(this)" banid="banforroom${status.index}">${item.name}</div>
		 </c:when>
		 <c:otherwise>
		 	<div class="bandiv button button-big button-rounded" onclick="selectBan(this)" banid="banforroom${status.index}">${item.name}</div>
		 </c:otherwise>
		</c:choose>
	</c:forEach>
</div>
<c:forEach	items="${loudong}" var="item" varStatus="status">
	<c:choose>
		  <c:when test="${status.index==0}">
			<div id="banforroom${status.index}" class="banforroom" style="">
				<div id="bandiv" class="clearfix" style="display: inline-block; margin: 0px 0px 10px;">
					<c:forEach	items="${item.danyuanList}" var="item2" varStatus="status2">
					<div id="unit${item2.name}" class="unit">
						<div class="roomUnitDiv button button-rounded button-caution" disabled="disabled">${item2.name}</div>
						<c:forEach	items="${item2.taoxingList}" var="item3" varStatus="status3">
						  <div class="col" id="col1单元${status3.index}">
						  	<div class="roomDivUnit clearfix button button-small button-rounded button-highlight" style="line-height:30px;" disabled="disabled">${item3.name}</div>
						  	<div class="col1">
							  	<c:forEach	items="${item3.shiHaoList}" var="item4" varStatus="status4">
							  		<c:choose>
									  <c:when test="${item4.getD_Monitor()=='1'}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" monitor="${item4.getD_Monitor()}" dState="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor1">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:when test="${item4.getD_Monitor()=='2'}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" monitor="${item4.getD_Monitor()}" dState="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor2">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:when test="${item4.getD_Monitor()=='3'}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" monitor="${item4.getD_Monitor()}" dState="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor3">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:when test="${item4.getD_state()=='1'}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" monitor="${item4.getD_Monitor()}" dState="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 dState1">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:when test="${item4.getD_state()=='2'}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" monitor="${item4.getD_Monitor()}" dState="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 dState2">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:otherwise>
									  		<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" monitor="${item4.getD_Monitor()}" dState="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor0">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:otherwise>
									 </c:choose>
							  	</c:forEach>
						  	</div>
						  	<div class="col2"></div>
						  </div>
						</c:forEach>
					</div>
					</c:forEach>
				</div>
			</div>
		</c:when>
		<c:otherwise>
			<div id="banforroom${status.index}" class="banforroom" style="display: none;">
				<div id="bandiv" class="clearfix" style="display: inline-block; margin: 0px 0px 10px;">
					<c:forEach	items="${item.danyuanList}" var="item2" varStatus="status2">
					<div id="unit${item2.name}" class="unit">
						<div class="roomUnitDiv button button-rounded button-caution" disabled="disabled">${item2.name}</div>
						<c:forEach	items="${item2.taoxingList}" var="item3" varStatus="status3">
						  <div class="col" id="col1单元${status3.index}">
						  	<div class="roomDivUnit clearfix button button-small button-rounded button-highlight" style="line-height:30px;" disabled="disabled">${item3.name}</div>
						  	<div class="col1">
							  	<c:forEach	items="${item3.shiHaoList}" var="item4" varStatus="status4">
							  		<c:choose>
									  <c:when test="${item4.getD_Monitor()==1}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" mstate="${item4.getD_Monitor()}" rstate="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor1">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:when test="${item4.getD_Monitor()==2}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" mstate="${item4.getD_Monitor()}" rstate="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor2">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:when test="${item4.getD_Monitor()==3}">
							  				<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" mstate="${item4.getD_Monitor()}" rstate="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor3">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:when>
									  <c:otherwise>
									  		<div style="letter-spacing: 0px;" id="${item4.getD_ID()}" mstate="${item4.getD_Monitor()}" rstate="${item4.getD_state()}" class="roomDiv button button-small button-rounded button-flat-primary roomDiv-background-0 monitor0">${item4.getD_RoomNo()}<div rid="${item4.getD_ID()}"  class="cover"></div></div>
									  </c:otherwise>
									 </c:choose>
							  	</c:forEach>
						  	</div>
						  	<div class="col2"></div>
						  </div>
						</c:forEach>
					</div>
					</c:forEach>
				</div>
			</div>
		</c:otherwise>
	</c:choose>
</c:forEach>